"use client";
import { Dispatch, SetStateAction } from "react";

export default ({ popser, stskktFun }: { popser: { id: number }[], stskktFun: Dispatch<SetStateAction<boolean>>}) => {
  const butKik = (val: number) => {
    // 偶数项目开启 （05:33:00）
    if ((val & 1) === 0) {
      stskktFun(true);
      history.pushState(null, '', '/af/cn');
    }
  };
  return (
    <div style={{ width: "150px" }}>
      {popser.map((item) => (
        <button
          key={item.id}
          onClick={() => butKik(item.id)}
          style={{
            width: "100%",
            backgroundColor: "darkgray",
          }}
        >
          {item.id}
        </button>
      ))}
    </div>
  );
};
